package com.pty.demo.structural.adapter.inter;

import com.pty.demo.structural.adapter.TypeCPowerBankAdaptee;

/**
 * @author pengty
 * @date 2020/3/12
 */
public class InterfaceLightingAdapter extends AbstractLightingAdapter {

    private TypeCPowerBankAdaptee typeCPowerBankAdaptee;

    public InterfaceLightingAdapter(TypeCPowerBankAdaptee typeCPowerBankAdaptee) {
        this.typeCPowerBankAdaptee = typeCPowerBankAdaptee;
    }

    @Override
    public void toLighting() {
        System.out.println("使用接口适配器 完成 typeC 适配 Lighting");
        typeCPowerBankAdaptee.typeCRecharge();
    }
}
